package Data;

import org.hibernate.Session;
/**
 * Class that is responsible for the deleting, saving , updating files in the DB
 * @author Erez
 * 
 */

public class FileManager {
 private Session session = null;
 public FileManager(Session session) {
  if(session == null)
    throw new 
      RuntimeException("Invalid session object.");
  this.session = session;
 }
 public void saveFile(FileData file){
  session.save(file);
 }
 public void updateFile(FileData file){
  session.update(file);
 }
 public void deleteFile(FileData file){
	  session.delete(file);
	 }
}
